package com.hulk.dryad.admin.mapstruct;

import com.hulk.dryad.admin.api.dto.UserInfoDTO;
import com.hulk.dryad.persistence.entity.UserInfoModel;
import com.hulk.dryad.persistence.struct.BasicStruct;
import org.mapstruct.BeanMapping;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;


/**
 * @author hulk
 * @version 1.0
 * @date 2020/10/16 10:11 上午
 */
@Mapper(uses = SysUserStruct.class)
public interface UserInfoStruct extends BasicStruct<UserInfoDTO,UserInfoModel> {

	UserInfoStruct INSTANCE = Mappers.getMapper(UserInfoStruct.class);


	@Override
	@BeanMapping(ignoreByDefault = false)
	@Mappings({
			@Mapping(source = "sysUserVO", target = "sysUserModel" ,qualifiedByName = "sysUserStruct" )
	})
	UserInfoModel to(UserInfoDTO source) ;
}
